STK.register('app.common.request', function($){
    return function(spec){
        spec.method = spec.method || 'post';
        spec.timeout = spec.timeout || 10000;
        spec.cb = spec.cb ||
        function(){
        };
        if (!spec.url) 
            return;
        spec.onComplete = function(json){
            if (json.code == "OK0000") {
                spec.cb();
                for (i in json.data) {
                    $.gListener && $.gListener.fire(i, [json.data[i],i]);
                }
            }
        };
        spec.onFail = function(json){
            if (spec.ecb) {
				spec.ecb(json);
			}else{
				alert($.L(json.code));
			}
        };
        spec.onTimeout = spec.onFail;
        $.ajax(spec);
    };
});